﻿@model Teleplex.DataModels.TVShow

<div class="container">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>Edit TV Show</h4>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-4">

                        <form class="form-group" method="post">
                            <input type="text" class="form-control" value="@Model.Title" name="title" placeholder="TV Show Title..." />
                            <input type="text" class="form-control" value="@Model.Synopsis" name="synopsis" placeholder="Synopsis..." />
                            <input type="text" class="form-control" value="@Model.ImageURL" name="imageURL" placeholder="Image URL" />
                            <input type="hidden" value="@Model.Id" name="id" />
                            <input type="submit" class="form-control btn btn-success" value="Save Changes" />
                        </form>
                        <form class="form-group" method="post" action="/TVShow/DeleteShow">
                            <input type="hidden" value="@Model.Id" name="id" />
                            <input type="submit" value="-Delete Show" class="form-control btn btn-danger" />
                        </form>
                    </div>
                    <div class="col-sm-4">
                        <table class="table table-hover">
                            @foreach(var character in @Model.Characters)
                            {
                                <tr>
                                    <td>
                                        @character.Name
                                    </td>
                                    <td>
                                        <form method="post" action="/TVCharacter/DeleteCharacter">
                                            <input type="hidden" name="id" value="@character.Id" />
                                            <input type="submit" class="btn btn-danger btn-sm" value="-Delete" />
                                        </form>
                                    </td>
                                </tr>
                            }

                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
